package com.hoangkien.adapter;

import java.util.ArrayList;
import java.util.List;
import com.hoangkien.entity.CategoryEntity;
import com.mango.hoangkien.coloringkids.R;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;

public class CategoryAdapter extends ArrayAdapter<String>{
	private Context context;
	private TextView tv;
	private String[] arrCateName;

	public CategoryAdapter(Context context, int resource, String[] objects) {
		super(context, resource, objects);
		this.context = context;
		this.arrCateName = objects;
	}
	
	@Override
	public View getView(int position, View convertView, ViewGroup parent) {
		LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
		View rowView = inflater.inflate(R.layout.drawer_list_item, parent,false);
		tv  = (TextView) rowView.findViewById(R.id.text1);
		tv.setText(arrCateName[position]);
		return  rowView;
	}

}
